using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using IdentityServer4.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Yozeev.BusinessLogic
{
    /// <summary>
    /// 单据明细
    /// </summary>
    public class ActivityDetail : ByBranchEntity<Guid>
    {
        /// <summary>
        /// 单据标识
        /// </summary>
        public Guid ActivityId { get; set; }
        [ForeignKey("ActivityId")]
        public virtual Activity Activity { get; set; }
        /// <summary>
        /// 票型价格标识
        /// </summary>
        public Guid TicketPriceId { get; set; }
        [ForeignKey("TicketPriceId")]
        public virtual TicketPrice TicketPrice { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public long Quantity { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        public decimal UnitPrice { get; set; }
        /// <summary>
        /// 折扣
        /// </summary>
        public decimal Discount { get; set; }
        /// <summary>
        /// 折后价
        /// </summary>
        public decimal SalePrice { get; set; }
        /// <summary>
        /// 总金额
        /// </summary>
        public decimal TotalAmount { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 结账单标识
        /// </summary>
        public Guid? AccountId { get; set; }
        //[ForeignKey("AccountId")]
        //public virtual Account Account { get; set; }
        /// <summary>
        /// 结算单明细标识
        /// </summary>
        public Guid? AccountDetailId { get; set; }
        //[ForeignKey("AccountDetailId")]
        //public virtual AccountDetail AccountDetail { get; set; }
        /// <summary>
        /// 原明细编码
        /// </summary>
        public Guid? OrgDetailId { get; set; }
        //[ForeignKey("OrgDetailId")]
        //public virtual AccountDetail OrgDetail { get; set; }
        //public Guid? CustomerId { get; set; }
        public Customer Customer { get; set; }
        /// <summary>
        /// 航班标识
        /// </summary>
        public Guid? ScheduleId { get; set; }
        [ForeignKey("ScheduleId")]
        public virtual Schedule Schedule { get; set; }
        /// <summary>
        /// 仓位
        /// </summary>
        public WareHousePosition WarePosition { get; set; }
    }
}
